package com.dameng.jianyouquan.mvp.presenter.impl;

import android.content.Context;

import com.dameng.jianyouquan.base.mvpBase.BasePresenterImpl;
import com.dameng.jianyouquan.mvp.model.LoginModel;
import com.dameng.jianyouquan.mvp.presenter.LoginPresenter;
import com.dameng.jianyouquan.mvp.view.view.LoginView;

public class LoginPresenterImpl extends BasePresenterImpl<LoginView> implements LoginPresenter, LoginModel.OnLoginListener {

    private LoginView mView;
    private LoginModel loginModel;


    public LoginPresenterImpl(LoginView mView, LoginModel loginModel) {
        this.mView = mView;
        this.loginModel = loginModel;
    }

    @Override
    public void login(Context context,String phone, String pwd) {
        loginModel.login(context,phone,pwd,this);
    }



    @Override
    public void loginSuccess() {
        mView.loginSuccess();
    }

    @Override
    public void loginFail(String msg) {
        mView.loginFail(msg);
    }


}
